module.exports = function (gulp, $, config) {
    gulp.task('sass', function(done) {
      var minifycss = $.if(config.isProduction, $.cleanCss({keepSpecialComments: 0}));

      return gulp.src(config.sass.src)
        .pipe($.sourcemaps.init())
        .pipe($.sass({
          errLogToConsole: true
        }).on('error', $.sass.logError))
        // .pipe($.autoprefixer({
        //   browsers: config.sass.compatibility
        // }))
        .pipe(minifycss)
        .pipe($.if(!config.isProduction, $.sourcemaps.write()))
        .pipe(gulp.dest(config.sass.dest))
        .pipe($.browser.stream())
    });
};
